﻿// /*
//  * @Author: wanyiming
//  * @Date:2024-05-22-21:28
//  * @Description:
//  */

using System.Collections.Generic;
using Code.DataManager;
using Code.GameLogic.BaseClass;
using Code.GameLogic.Common;
using Code.GameLogic.Monster.Controller.MonsterBehavior;
using QFramework;
using Unity.VisualScripting;
using UnityEngine;

namespace Code.GameLogic.Monster.Controller
{
    public class MonsterManager : AbsGameLogicManager
    {
        private List<MonsterFlashPointController> _monsterFlashPoint= new List<MonsterFlashPointController>();

        public void CreateMonsterFlashPoint(GameObject blockGo)
        {
            PrintLogger("创建怪物刷新点：" + blockGo);
            MonsterFlashPointController bindControllerToGo 
                = BindControllerToGo<MonsterFlashPointBo,MonsterFlashPointController,MonsterManager>("flashPoint"+blockGo.gameObject.name,blockGo.transform, this.GetModel<SettingBo>().MonsterFlashPoint,this);
            _monsterFlashPoint.Add(bindControllerToGo);
        }


        public void CreateMonster(string monsterType, MonsterFlashPointController monsterFlashPointController)
        {
            MonsterBo monsterBo = this.GetModel<SettingBo>().MonsterBos[monsterType];
            MonsterController bindControllerToGo = BindControllerToGo<MonsterBo, MonsterController, MonsterManager>(monsterBo.BaseDescription.TypeName,monsterFlashPointController.transform,monsterBo,this);
            bindControllerToGo.BindComponent<MonsterController,MoveComponent>(bindControllerToGo);
            GlobalCommon.MonsterUIVo.MonsterNum++;
        }


    }
}